home *** CD-ROM | disk | FTP | other *** search
/ Aminet 15 / Aminet 15 - Nov 1996.iso / Aminet / util / misc / ViewNDel.readme < prev   
Encoding:
Text File  |  1996-10-11  |  4.2 KB  |  102 lines

  1. Short:   Make 'pruning' files easy !
  2. Author:  j_slee00@tpnet.co.nz (James Sleeman)
  3. Type:    util/misc
  4. Uploade: j_slee00@tpnet.co.nz (James Sleeman)
  5.  
  6. -------------------------------------------------------------------------------
  7. Command  : ViewNDel
  8. Function : Run upto 2 commands over a file before asking wether to delete
  9.         or not.  Useful from DOpus type programs for 'Pruning'
  10.         directories of archives, pictures etc etc.
  11. Author   : James Sleeman
  12. Language : C
  13. Compiled : SAS/C 6.51
  14.  
  15. DESCRIPTION
  16.  
  17.     I had a large directory of archive which I had gathered up over a
  18. while for various BBS's and the like, but of course I had no-idea which
  19. ones were of importance to me anymore and which I was able to delete.  So
  20. since I had just got SAS/C 6.51 and was teaching myself 'C' I thought it
  21. would be a good idea to write a small program which took a filename as an
  22. argument and then showed the contents of the file (archive) before asking
  23. if you wanted to delete it.  Of course this could have been done from a
  24. script .. but I need the practise in 'C'.  After I had whipped up a small
  25. hack to do this (5 mins or so) and used it from DOPUS to prune my archives
  26. directory (by making a button that called this program with each filename
  27. that was selected in turn) I set to generalise the program and came up with
  28. 'ViewNDel'.  
  29.  
  30. USAGE
  31.  
  32. Usage is from CLI only, and it only accepts 5 arguments, The first one is
  33. either T or F, if it is T then the program will ask if you want to delete
  34. the file or not, if it is F (or anything else for that matter) it will not
  35. ask you if you want to delete the file and neither will it delete the file
  36. at all.  The second argument is the file (including path of course) to
  37. actually do the operations on.  The third and fourth arguments are 2
  38. commands to run on the file, both are optional, but if you only have one
  39. then you can't use the 5th argument (else the fifth argument will be used
  40. as the 4th .. just cause I am lazy and can't be bothered putting in
  41. argument specifiers, or using ReadArgs for that matter).  The Fifth
  42. argument is pretty trivial, it prints out the commands (incorporated with
  43. filename) that the program executes, there is nothing specific yuo have to
  44. put for this argument, the mere fact that it exists will be sufficient to
  45. turn the option on.  
  46.  
  47. EXAMPLES
  48.  
  49. --> ViewNDel T S:Startup-Sequence Type "Type >Speak:"
  50.  
  51. this will first Type the file S:Startup-Sequence, and then speak the
  52. startup-sequence (actually type to the speak: device, but you knew that
  53. already), and finnaly ask you if you want to delete the file (if you press
  54. Y or y then it will be deleted using C:Delete - this is specified in the
  55. source, if you want it to delete it using some other method just edit the
  56. source and re-compile, or email me and ask me to update the program to
  57. accept another parameter for the delete command and I will do so.
  58.  
  59. --> ViewNDel F S:Startup-Sequence Type "Type >Speak:" Debug
  60.  
  61. This will do thew same as above, except that it will not ask if you want to
  62. delete the file (and it won't delete it either), and before it executes the
  63. commands it will print them out for you to see.
  64.  
  65. --> ViewNDel T sys:ViewNDel.lha "lha v"
  66.  
  67. This will view the archive "sys:ViewNDel.lha" and then ask if you want to
  68. delete it.
  69.  
  70. IMPORTANT
  71.  
  72. The first 2 arguments MUST be specified, this is just because I am Lazy
  73. though and can't be bothered to add argument specifiers at 12:47am on a
  74. Friday night .. if you have some strange desire to have them added lemme
  75. know and I will do so for you.
  76.  
  77. WARRANTY
  78.  
  79. None, use at your own risk.  There should be nothing that can harm your
  80. system though as long as you supply the arguments as I have said.
  81.  
  82. DISTRIBUTION
  83.  
  84. Email-Ware, if you use it send me some EMAIL, since this is my first 'C'
  85. program for real I am releasing the surce to anyone that want's it to, just
  86. drop me a line and I'll email it too you.
  87.  
  88. CONTACT
  89.  
  90. j_slee00@tpnet.co.nz
  91. sleemanj@voyager.co.nz
  92.  
  93.  
  94. ============================= Archive contents =============================
  95.  
  96. Original  Packed Ratio    Date     Time    Name
  97. -------- ------- ----- --------- --------  -------------
  98.    22472   11273 49.8% 27-Sep-96 23:10:16  ViewNDel
  99.     3560    1672 53.0% 28-Sep-96 00:53:36  ViewNDel.doc
  100. -------- ------- ----- --------- --------
  101.    26032   12945 50.2% 04-Oct-96 18:33:36   2 files
  102.